package com.csx.base.design.structure.flyweight;

/**
 * @author cuisongxu
 * @date 2022/9/21 12:15
 */
public class Grass implements Drawable{

    /**
     * 草地图片材质
     */
    public String image;

    public Grass() {
        this.image = "草地";
        System.out.println("从磁盘加载[ " + image + " ]图片,耗时半秒");
    }

    @Override
    public void draw(int x, int y) {
        System.out.println("在位置 [" + x + ":" + y + "]上绘制图片: [" + image + "]");
    }
}
